<script>
import { mapMutations, mapActions } from 'vuex'
export default {
  onLaunch: function () {
    // 初始化登录状态
    this.initLogin()
  },
  onShow: function () {
    console.log('App Show')
  },
  onHide: function () {
    console.log('App Hide')
  },
  methods: {
    ...mapActions(['initLogin'])
  },
  onPageNotFound: function (route, redirectRoute) {
    // 路由错误时跳转到404页面
    uni.redirectTo({
      url: '/pages/error/error'
    })
  }
}
</script>

<style lang="scss">
/*每个页面公共css */
@import '@/common/main.css';
@import '@/common/common-ui.css';
@import '@/common/common.css';
@import '@/common/iconfont/iconfont.css';
</style>
